### Project 7 A Frightened Butterfly **1.Description** Have you ever caught butterflies? As we all know, the butterflies will feel frightened and fly away when we are close to them. In this project, we will make an experiment with a butterfly. Task analysis | Sensor | Capacitive Touch Module | | ------ | ---------------------------------------------------- | | Role | Butterfly 1 | | Place | Forest | | Result | The butterfly will fly away when we touch the sensor | **2.Capacitive Touch Module Introduction** ![img](media/wps1-1765162649354-1.png) The Keyestudio capacitive touch module mainly uses touch detection IC, which is a digital signal output device. The touch detection IC is designed to replace the traditional button with a variable area key, featuring low power consumption and wide operating voltage. When power on the module, it needs a stabilization time of about 0.5 sec. During this period, do not touch the keypad. At this time, all functions are disabled, and self-calibration is always performed. If we don’t touch the key, the recalibration period is about 4.0sec. Capacitive touch sensors can be used in many places such as waterproof electrical appliances and button key replacement. **Specifications** - Operating voltage: DC 3.3V~5V - Output signal:Digital signal - Dimension: 31mm*27mm*2.5mm - Weight: 1.7g - Environmental protection attributes:ROHS **3.Components Needed** | Control Board * 1 | USB Cable*1 | Alligator Clip Wire*3 | Capacitive Touch Module*1 | | -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | | ![](media/image-20251208105931177.png) | ![](media/image-20251208105938951.png) | ![](media/image-20251208110000926.png) | ![](media/image-20251208110006801.png) | **4.Connection Diagram** ![](media/image-20251208110130116.png) **5.Test Program** 1.Open“KidsBlock”software to create a new project. 2.Delete the beetle role. 3.Select “Forest”:click the background library icon![](media/image-20251208110245780.png)in the lower right corner to select Forest. ![](media/image-20251208110309768.png) 4.Select Butterfly 1and Cat, then click Butterfly 1 to choose Butterfly 1-C ![](media/image-20251208110335261.png) 5.Adjust the position and dimension of the role ![](media/image-20251208110351112.png) 6.Build the program ①Select “Butterfly 1”and build the program. ![](media/image-20251208110631008.png) 7.Save the project and name it“A Frightened Butterfly”. **6.Complete Program** ![](media/image-20251208110709505.png) **7.Test Result** Connect the device and select the port, then click![](media/image-20251208110740247.png).When we touch the capacitive sensor module, the butterfly will fly to the tree. ![](media/image-20251208110758247.png) ![](media/image-20251208110807758.png) **8.Program Explanation** | Instruction | Function | Module | | -------------------------------------- | ------------------------------------------------------------ | -------- | | ![](media/image-20251208110907071.png) | Execute it repeatedly | Control | | ![](media/image-20251208110922855.png) | The facing angle of role will be adjusted to 45 degrees. | Movement | | ![](media/image-20251208110948377.png) | The role will fly to the specified position in 1s (X:198 Y:97). | Movement |